Skip to content

Conversation

@stevenh
Copy link
Contributor

@stevenh stevenh commented Jul 10, 2025

Support pytest-cov by disabling include-ignored, allowing pytest-cov to be run, which has built in support for coverage reporting is VS Code making it super useful for checking coverage while writing tests.

Related issues:

Without this the coverage run will fail with an error about conflicting coverage options.

Configure coverage paths so its easy to run coverage from the command line with the data downloaded from the CI run, enabling easy analysis of the coverage data.

@DouweM DouweM self-assigned this Jul 10, 2025
@DouweM
Copy link
Collaborator

DouweM commented Jul 10, 2025

Support pytest-cov by disabling include-ignored

This seems a bit shady: if the --include argument is being ignored, wouldn't we want to know that? Would this mean that the include list a couple of lines up is being ignored as well?

pytest-dev/pytest-cov#369 suggests this is because of using include and source together. nedbat/coveragepy#621 (comment) suggests it's fine though.

I'd like to understand better what the warning we're hiding actually implies and that we're not accidentally silently ignoring a real issue.

Support pytest-cov by disabling include-ignored, allowing pytest-cov to
be run, which has built in support for coverage reporting is VS Code
making it super useful for checking coverage while writing tests.

Related issues:
- pytest-dev/pytest-cov#532
- pytest-dev/pytest-cov#369

Without this the coverage run will fail with an error about conflicting
coverage options.

Configure coverage paths so its easy to run coverage from the command
line with the data downloaded from the CI run, enabling easy analysis
of the coverage data.
@stevenh stevenh force-pushed the chore/pytest-cov branch from 5b78db6 to 3ba7abf Compare July 10, 2025 20:54
@DouweM DouweM enabled auto-merge (squash) July 10, 2025 20:56
@DouweM DouweM merged commit a5f4b11 into pydantic:main Jul 10, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants